Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
8c478366
Commit
8c478366
authored
Jul 27, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable autoscroll pressing on back_on_top sticky panel
parent
952f9fa7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+5
-1
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
8c478366
...
...
@@ -73,6 +73,7 @@ function Page_Distrubion(socket) {
var
sidebarOffset
=
0
;
var
new_lines
=
[];
var
current_file_in_preview
=
false
;
var
back_on_top_pressed
=
false
;
function
__check_hash_makes_sense
()
{
if
(
window
.
location
.
hash
.
indexOf
(
'
..
'
)
>=
0
)
{
...
...
@@ -416,6 +417,7 @@ function Page_Distrubion(socket) {
var
file
=
{
set
:
function
(
socket_data
)
{
back_on_top_pressed
=
false
;
var
new_content
=
Utils
.
escape_html
(
socket_data
.
file
.
content
);
var
file_content
=
$
(
'
#file .content
'
);
view
.
file
=
Utils
.
clone
(
socket_data
.
file
);
...
...
@@ -433,7 +435,7 @@ function Page_Distrubion(socket) {
new_content
=
Utils
.
escape_html
(
new_content
);
if
(
!
current_file_in_preview
)
{
file_content
.
append
(
new_content
);
if
(
config
.
preferences
.
autoscroll
)
{
if
(
config
.
preferences
.
autoscroll
&&
!
back_on_top_pressed
)
{
// scroll down if file is covering footer
var
file_height
=
$
(
'
#fileOffset
'
).
offset
().
top
;
var
footerOffset
=
$
(
'
footer
'
).
offset
().
top
;
...
...
@@ -802,6 +804,8 @@ function Page_Distrubion(socket) {
// Init sticky-package back_on_top on click
$
(
'
#sticky-package
'
).
on
(
'
click
'
,
function
()
{
back_on_top_pressed
=
true
;
debug
(
1
,
'
back on top pressed, disabling autoscroll
'
)
page
.
go
.
up
(
100
);
});
...
...
Write
Preview
Markdown
is supported
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