Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
87fe9474
Commit
87fe9474
authored
10 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Scroll to most-recent thread entry
parent
1221fcf0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scp/js/scp.js
+2
-2
2 additions, 2 deletions
scp/js/scp.js
scp/js/ticket.js
+8
-0
8 additions, 0 deletions
scp/js/ticket.js
with
10 additions
and
2 deletions
scp/js/scp.js
+
2
−
2
View file @
87fe9474
...
@@ -450,13 +450,13 @@ var scp_prep = function() {
...
@@ -450,13 +450,13 @@ var scp_prep = function() {
stop
=
$
(
'
div.sticky.bar.stop
'
),
stop
=
$
(
'
div.sticky.bar.stop
'
),
stopAt
,
stopAt
,
visible
=
false
;
visible
=
false
;
if
(
stop
.
length
)
stopAt
=
stop
.
offset
().
top
-
$that
.
height
();
$that
.
find
(
'
.content
'
).
width
(
$that
.
width
());
$that
.
find
(
'
.content
'
).
width
(
$that
.
width
());
$
(
window
).
scroll
(
function
(
event
)
{
$
(
window
).
scroll
(
function
(
event
)
{
// what the y position of the scroll is
// what the y position of the scroll is
var
y
=
$
(
this
).
scrollTop
();
var
y
=
$
(
this
).
scrollTop
();
if
(
stop
.
length
)
stopAt
=
stop
.
offset
().
top
-
$that
.
height
();
// whether that's below the form
// whether that's below the form
if
(
y
>=
top
&&
(
!
stopAt
||
stopAt
>
y
))
{
if
(
y
>=
top
&&
(
!
stopAt
||
stopAt
>
y
))
{
...
...
This diff is collapsed.
Click to expand it.
scp/js/ticket.js
+
8
−
0
View file @
87fe9474
...
@@ -343,6 +343,9 @@ $.refreshTicketView = function() {
...
@@ -343,6 +343,9 @@ $.refreshTicketView = function() {
}
}
var
ticket_onload
=
function
(
$
)
{
var
ticket_onload
=
function
(
$
)
{
if
(
0
===
$
(
'
#ticket_thread
'
).
length
)
return
;
//Start watching the form for activity.
//Start watching the form for activity.
autoLock
.
Init
();
autoLock
.
Init
();
...
@@ -422,6 +425,11 @@ var ticket_onload = function($) {
...
@@ -422,6 +425,11 @@ var ticket_onload = function($) {
});
});
$
.
showImagesInline
(
$
(
'
#ticket_thread
'
).
data
(
'
imageUrls
'
));
$
.
showImagesInline
(
$
(
'
#ticket_thread
'
).
data
(
'
imageUrls
'
));
var
last_entry
=
$
(
'
#ticket_thread .thread-entry
'
).
last
().
offset
().
top
-
50
;
$
(
'
html, body
'
).
animate
({
scrollTop
:
last_entry
},
1000
);
};
};
$
(
ticket_onload
);
$
(
ticket_onload
);
$
(
document
).
on
(
'
pjax:success
'
,
function
()
{
ticket_onload
(
jQuery
);
});
$
(
document
).
on
(
'
pjax:success
'
,
function
()
{
ticket_onload
(
jQuery
);
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment