Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 6bbe66a

Browse files
committed
BT-44 - In script.js, removed the plugin_backup object and references to it from admin since it was throwing JavaScript exceptions in my testing; also changed how we hide the "backup running" section to use display instead of visibility
1 parent 5b67e15 commit 6bbe66a

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

admin.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ protected function runBackup()
150150
$fn = mediaFN($id);
151151
try {
152152
echo '<div class="log">';
153-
echo '<script>plugin_backup.start();</script>';
154153
tpl_flush();
155154
$this->createBackup($fn, $this->loadPreferences(), [$this, 'logXHTML']);
156155
echo '</div>';
@@ -161,8 +160,7 @@ protected function runBackup()
161160
@unlink($fn);
162161
}
163162

164-
echo '<script>document.getElementsByClassName(\'bt-running\')[0].style.visibility=\'hidden\';</script>';
165-
echo '<script>plugin_backup.stop();</script>';
163+
echo '<script>document.getElementsByClassName(\'bt-running\')[0].style.display=\'none\';</script>';
166164
}
167165

168166
/**

script.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
var plugin_backup = {
2-
timer: null,
3-
$log: null,
4-
5-
start: function() {
6-
plugin_backup.$log = jQuery('.plugin_backup .log');
7-
plugin_backup.timer = window.setInterval(function() {
8-
plugin_backup.$log.scrollTop(plugin_backup.$log[0].scrollHeight);
9-
}, 100);
10-
},
11-
12-
stop: function() {
13-
if (plugin_backup.timer) {
14-
window.clearInterval(plugin_backup.timer);
15-
plugin_backup.timer = null;
16-
}
17-
jQuery('.plugin_backup .running').hide();
18-
plugin_backup.$log.scrollTop(plugin_backup.$log[0].scrollHeight);
19-
}
20-
};
21-
221
var btColl = document.getElementsByClassName("collapsible");
232
for (var btIter = 0; btIter < btColl.length; i++) {
243
btColl[btIter].addEventListener("click", function() {

0 commit comments

Comments
 (0)