Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
e5891c57
Commit
e5891c57
authored
Feb 09, 2022
by
Eric Oulashin
Committed by
Rob Swindell
Feb 09, 2022
Browse files
Added an option to pause after viewing a file (defaults to true)
parent
cf3ecb0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
xtrn/ddfilelister/ddfilelister.cfg
xtrn/ddfilelister/ddfilelister.cfg
+3
-0
xtrn/ddfilelister/ddfilelister.js
xtrn/ddfilelister/ddfilelister.js
+10
-4
xtrn/ddfilelister/readme.txt
xtrn/ddfilelister/readme.txt
+4
-0
xtrn/ddfilelister/revision_history.txt
xtrn/ddfilelister/revision_history.txt
+2
-1
No files found.
xtrn/ddfilelister/ddfilelister.cfg
View file @
e5891c57
...
...
@@ -8,5 +8,8 @@
; DATE_D: Import date/time descending sort order
sortOrder=NATURAL
; Whether or not to pause after viewing a file
pauseAfterViewingFile=true
; The name of the color theme configuration file
themeFilename=defaultTheme.cfg
xtrn/ddfilelister/ddfilelister.js
View file @
e5891c57
...
...
@@ -16,7 +16,8 @@
* 2022-02-07 Eric Oulashin Version 2.01
* Fixed file description being undefined when viewing
* file info. Fixed command bar refreshing when pressing
* the hotkeys.
* the hotkeys. Added an option to pause after viewing a
* file (defaults to true).
*/
if
(
typeof
(
require
)
===
"
function
"
)
...
...
@@ -170,6 +171,8 @@ var gErrorMsgBoxULY = 4;
var
gErrorMsgBoxWidth
=
console
.
screen_columns
-
2
;
var
gErrorMsgBoxHeight
=
3
;
// Whether or not to pause after viewing a file
var
gPauseAfterViewingFile
=
true
;
///////////////////////////////////////////////////////////////////////////////
// Script execution code
...
...
@@ -188,6 +191,7 @@ if (!gFilebase.open())
// If there are no files in the filebase, then say so and exit now.
if
(
gFilebase
.
files
==
0
)
{
gFilebase
.
close
();
var
libIdx
=
file_area
.
dir
[
bbs
.
curdir_code
].
lib_index
;
console
.
crlf
();
console
.
print
(
"
\
1n
\
1cThere are no files in
\
1h
"
+
file_area
.
lib_list
[
libIdx
].
description
+
"
\
1n
\
1c -
\
1h
"
+
...
...
@@ -502,7 +506,8 @@ function viewFile(pFilebase, pFileList, pFileListMenu)
console
.
print
(
"
\
1n
"
);
console
.
crlf
();
var
successfullyViewed
=
bbs
.
view_file
(
fullyPathedFilename
);
if
(
!
successfullyViewed
)
console
.
print
(
"
\
1n
"
);
if
(
gPauseAfterViewingFile
||
!
successfullyViewed
)
console
.
pause
();
retObj
.
reDrawListerHeader
=
true
;
...
...
@@ -2311,7 +2316,6 @@ function readConfigFile()
var
setting
=
null
;
// A setting name (string)
var
settingUpper
=
null
;
// Upper-case setting name
var
value
=
null
;
// To store a value for a setting (string)
var
valueUpper
=
null
;
// Upper-cased value for a setting (string)
while
(
!
cfgFile
.
eof
)
{
// Read the next line from the config file.
...
...
@@ -2343,7 +2347,7 @@ function readConfigFile()
setting
=
trimSpaces
(
fileLine
.
substr
(
0
,
equalsPos
),
true
,
false
,
true
);
settingUpper
=
setting
.
toUpperCase
();
value
=
trimSpaces
(
fileLine
.
substr
(
equalsPos
+
1
),
true
,
false
,
true
);
valueUpper
=
value
.
toUpperCase
();
var
valueUpper
=
value
.
toUpperCase
();
// Set the appropriate valueUpper in the settings object.
if
(
settingUpper
==
"
SORTORDER
"
)
...
...
@@ -2374,6 +2378,8 @@ function readConfigFile()
else
// Default
gFileSortOrder
=
FileBase
.
SORT
.
NATURAL
;
}
else
if
(
settingUpper
==
"
PAUSEAFTERVIEWINGFILE
"
)
gPauseAfterViewingFile
=
(
value
.
toUpperCase
()
==
"
TRUE
"
);
else
if
(
settingUpper
==
"
THEMEFILENAME
"
)
{
// First look for the theme config file in the sbbs/mods
...
...
xtrn/ddfilelister/readme.txt
View file @
e5891c57
...
...
@@ -165,6 +165,10 @@ sortOrder String: The file sort order to use.
DATE_A: Import date/time ascending sort order
DATE_D: Import date/time descending sort order
pauseAfterViewingFile Whether or not to pause after viewing a
file
themeFilename The name of the configuration file to
use for colors & string settings
...
...
xtrn/ddfilelister/revision_history.txt
View file @
e5891c57
...
...
@@ -7,5 +7,6 @@ Version Date Description
------- ---- -----------
2.01 2022-02-07 Fixed file description being undefined when viewing file
info. Fixed command bar refreshing when pressing the
hotkeys.
hotkeys. Added an option to pause after viewing a file
(defaults to true).
2.00 2022-02-06 Initial version.
\ No newline at end of file
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