https://github.com/clonemeagain/osticket-plugin-preventautoscroll
Stops the agent view from autoscrolling down to the last message in the thread. Allows you to disable it without modifying core code.
https://github.com/clonemeagain/osticket-plugin-preventautoscroll
osticket plugin scp
Last synced: about 15 hours ago
JSON representation
Stops the agent view from autoscrolling down to the last message in the thread. Allows you to disable it without modifying core code.
- Host: GitHub
- URL: https://github.com/clonemeagain/osticket-plugin-preventautoscroll
- Owner: clonemeagain
- Created: 2017-06-04T23:07:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T01:09:40.000Z (almost 8 years ago)
- Last Synced: 2024-08-03T01:12:07.363Z (9 months ago)
- Topics: osticket, plugin, scp
- Language: PHP
- Size: 6.84 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-osticket - Prevent Autoscroll - Stops the agent view from scrolling down to the last message in the thread. (Plugins / Community Plugins)
README
# osTicket plugin: Prevent Autoscroll
Stops agent ticket views from auto-scrolling to the last thread-entry.
Possibly overkill, but by making a plugin I am stopping myself from editing core.
Requirements: Install the AttachmentPreview plugin: https://github.com/clonemeagain/attachment_preview
That plugin exposes an API that lets other plugins edit the output of osTicket before it reaches the browser, this plugin needs that API.
## How to enable
* Download and unzip this plugin into your /include/plugins folder [v1.0 zip](https://github.com/clonemeagain/osticket-plugin-preventautoscroll/archive/v1.0.zip) [v1.0 gzip](https://github.com/clonemeagain/osticket-plugin-preventautoscroll/archive/v1.0.tar.gz)
* Use an admin account to visit /scp/plugins.php (Admin Panel => Manage => Plugins)
* Select "Add new Plugin"
* Press "Install" next to "Prevent Autoscroll"
* Click the checkbox next to "Prevent Autoscroll"
* From the "More dropdown" select "Enable"Now test by visiting a ticket, due to pjax, you might need to refresh the page. The only change should be that the viewport no longer scrolls to the last thread entry. All other functionality should still work, let me know if it doesn't.
## This plugin is not actually required
If you want this functionality without installing a plugin, simply edit ```/scp/js/thread.js```
```javascript
var thread = {options: {
autoScroll: true,
showimages: false
},scrollTo: function (entry) {
if (!entry) return;
var frame = 0;
... snip ...
```Modify it to:
```javascript
var thread = {options: {
autoScroll: true,
showimages: false
},scrollTo: function (entry) {
return; // Prevent Autoscroll MODif (!entry) return;
... snip ...
```