Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
2b49e6dd
Commit
2b49e6dd
authored
Sep 18, 2014
by
Julien Furrer
Browse files
CSS Fix: adjust Navbar title when window resized
parent
3225faa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
adim_app/static/_src/adim/ui.js
View file @
2b49e6dd
...
...
@@ -267,8 +267,25 @@ function($, Signal, paper, config, view, io, tools, attributes, exporter, AnObjM
);
_reservedHeight
=
(
$
(
"
#canvas-col
"
).
offset
().
top
+
_canvasToolBar
.
outerHeight
()
+
20
);
// The amount of window width needed for navbar elements other than anobj title
var
_$mainNavBar
=
$
(
"
#main-navbar
"
);
var
_navBarTitleDelta
=
(
function
(){
var
navHeader
=
_$mainNavBar
.
find
(
"
.navbar-header
"
),
navRight
=
_$mainNavBar
.
find
(
"
.navbar-right
"
),
navTitle
=
_$mainNavBar
.
find
(
"
.adim-image-name
"
),
value
;
value
=
navHeader
.
offset
().
left
+
navHeader
.
outerWidth
()
+
navRight
.
outerWidth
()
+
(
navTitle
.
outerWidth
()
-
navTitle
.
width
()
)
+
25
;
navTitle
.
find
(
"
.text
"
).
css
(
"
max-width
"
,
_$w
.
width
()
-
value
);
return
value
;
})();
_$w
.
on
(
'
resize
'
,
function
(){
adjustCanvasToImage
();
_$mainNavBar
.
find
(
"
.adim-image-name .text
"
).
css
(
"
max-width
"
,
_$w
.
width
()
-
_navBarTitleDelta
);
});
$
(
"
#side-col-panel-group .panel-collapse
"
)
...
...
adim_app/static/_src/less/adim.css
View file @
2b49e6dd
...
...
@@ -508,6 +508,10 @@ body {
box-shadow
:
0
0
2px
0px
#3d3d3d
;
}
#main-navbar
.adim-image-name
.text
{
display
:
inline-block
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
font-size
:
18px
;
line-height
:
1
;
font-weight
:
300
;
...
...
adim_app/static/_src/less/adim.less
View file @
2b49e6dd
...
...
@@ -92,7 +92,13 @@ html, body {
}
.adim-image-name {
.text {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 18px;
line-height: 1;
font-weight: 300;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment