Comments (5)
The easiest way is to add a ContentPanel
to the layout and set up custom style. This style must be defined in traccar.html
(either in <head>
or put css
somewhere in webapp
folder).
In LoginDialog.ui.xml
:
<!-- ... -->
<gxt:Window ui:field="window" pixelSize="300, 130" modal="true" closable="false" headingText="{i18n.authentication}" focusWidget="{login}">
<container:VerticalLayoutContainer>
<container:child layoutData="{verticalLayoutData}">
<g:ContentPanel bodyStyleName="logo"/>
</container:child>
<container:child layoutData="{verticalLayoutData}">
<form:FieldLabel text="{i18n.user}" labelWidth="110">
<form:widget>
<form:TextField ui:field="login" />
</form:widget>
</form:FieldLabel>
</container:child>
<!-- ... -->
In traccar.html
:
<!-- ... -->
<head>
<!-- ... -->
<style type="text/css">
.logo {
background: url('logo.jpg') no-repeat;
}
</style>
<!-- ... -->
</head>
<!-- ... -->
from traccar-web.
It didn't work. The ContentPanel is a widget from GXT not G and it is shown inside the Login dialog but doesn't show the image. I think this is because the login Dialog is a window. I think it should be a panel or something else. What do you think of redesign the login page? A vertical panel should work. Also, include the logo and title as a setting (for the administrator) would be great.
What do you think?
from traccar-web.
It's working for me with CenterLayoutContainer
:
<!-- ... -->
<container:child layoutData="{verticalLayoutData}">
<container:CenterLayoutContainer styleName="logo" pixelSize="280, 30"/>
</container:child>
<!-- ... -->
You should specify size in pixels and style.
Regarding redesigning, you may submit a separate feature request about it. If someone besides you would need it, I will do it. Right now I doubt that it's valuable to spend time on it.
from traccar-web.
It worked, thanks! But I had to change a couple of things. This is what I did.
- As you said, I had to add
pixelSize
in<container:child>
- I had to increase
window pixelSize
so the logo can fit. - I added
resizable = "false" draggable="false"
to Window attributes so It didn't look weird with user interactions.
I think the last modification shoud added to dev branch.
Thanks
from traccar-web.
You are welcome. Can you please file a pull request with these changes? (resizable and draggable set to false for login dialog)
from traccar-web.
Related Issues (20)
- Compact or clean database HOT 1
- traccar 4.3 HOT 3
- Not getting data after server rebooted HOT 3
- Managers Shall not view/edit/remove other manager groups, only admin can HOT 4
- incompatibility with database table HOT 2
- Get millage report between 7:00am - 7:00pm during a month, possible? HOT 4
- Updates HOT 2
- Add notifications HOT 1
- travel route HOT 3
- Getting latitude and longitude values for a device HOT 5
- getting google link HOT 1
- compiling error HOT 3
- Device is not shown any longer
- Session Expired after login - Only in Chrome HOT 1
- Notification about time inside geo-fence
- Unable to open password protected pdf in firefox
- Remote procedure call error #1122 HOT 8
- Version HOT 1
- Hi, is this project still alive? HOT 1
- Device not connected in Docker installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traccar-web.