Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
6ae64ef1
Commit
6ae64ef1
authored
4 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Go back to the simpler design, no more cleartoeol() calls, now that we
have frame.erase() - thanks Matt!
parent
4a67e6cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/ftn-setup.js
+10
-34
10 additions, 34 deletions
exec/ftn-setup.js
exec/xtrn-setup.js
+10
-32
10 additions, 32 deletions
exec/xtrn-setup.js
with
20 additions
and
66 deletions
exec/ftn-setup.js
+
10
−
34
View file @
6ae64ef1
...
...
@@ -62,7 +62,6 @@ frame.cycle();
var
key
;
var
zone
;
var
high_water
=
0
;
console
.
ungetstr
(
KEY_UP
);
while
(
!
js
.
terminated
)
{
key
=
console
.
getkey
();
...
...
@@ -70,49 +69,26 @@ while (!js.terminated) {
tree
.
getcmd
(
key
);
if
(
key
==
KEY_UP
||
key
==
KEY_DOWN
||
key
==
KEY_HOME
||
key
==
KEY_END
)
{
zone
=
tree
.
currentItem
.
__ftn_setup
;
function
crlf
()
{
info_frame
.
cleartoeol
();
info_frame
.
crlf
();
}
info_frame
.
home
();
info_frame
.
putmsg
(
'
\
1h
\
1w
'
+
zone
.
name
);
crlf
();
info_frame
.
erase
(
'
'
);
info_frame
.
putmsg
(
'
\
1h
\
1w
'
+
zone
.
name
+
'
\r\n
'
);
if
(
zone
.
desc
)
{
info_frame
.
putmsg
(
'
\
1n
\
1w
'
+
zone
.
desc
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
1n
\
1w
'
+
zone
.
desc
+
'
\r\n\r\n
'
);
}
if
(
zone
.
info
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cInformation
\
1w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
info
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
1h
\
1cInformation
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
info
+
'
\r\n\r\n
'
);
}
if
(
zone
.
coord
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cCoordinator
\
1w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
coord
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
1h
\
1cCoordinator
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
coord
+
'
\r\n\r\n
'
);
}
if
(
zone
.
email
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cEmail
\
1w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
email
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
1h
\
1cEmail
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
email
+
'
\r\n\r\n
'
);
}
if
(
addrs
[
zone
.
_zone_number
])
{
info_frame
.
putmsg
(
'
\
1h
\
1rExisting address found:
'
+
addrs
[
zone
.
_zone_number
]);
crlf
();
info_frame
.
putmsg
(
'
\
1h
\
1rExisting address found:
'
+
addrs
[
zone
.
_zone_number
]
+
'
\r\n
'
);
}
var
y
=
info_frame
.
cursor
.
y
;
while
(
high_water
>
y
)
{
crlf
();
high_water
--
;
}
high_water
=
y
;
}
if
(
frame
.
cycle
())
console
.
gotoxy
(
console
.
screen_columns
,
console
.
screen_rows
);
}
...
...
This diff is collapsed.
Click to expand it.
exec/xtrn-setup.js
+
10
−
32
View file @
6ae64ef1
...
...
@@ -63,53 +63,31 @@ frame.cycle();
var
key
;
var
xtrn
;
var
high_water
=
0
;
console
.
ungetstr
(
KEY_UP
);
while
(
!
js
.
terminated
)
{
key
=
console
.
getkey
();
if
(
key
.
toLowerCase
()
==
'
q
'
)
break
;
tree
.
getcmd
(
key
);
function
crlf
()
{
info_frame
.
cleartoeol
();
info_frame
.
crlf
();
}
if
(
key
==
KEY_UP
||
key
==
KEY_DOWN
||
key
==
KEY_HOME
||
key
==
KEY_END
)
{
xtrn
=
tree
.
currentItem
.
__xtrn_setup
;
info_frame
.
home
();
info_frame
.
putmsg
(
'
\
x01h
\
x01w
'
+
xtrn
.
Name
);
crlf
();
info_frame
.
erase
(
'
'
);
info_frame
.
putmsg
(
'
\
x01h
\
x01w
'
+
xtrn
.
Name
+
'
\r\n
'
);
if
(
xtrn
.
Desc
)
{
info_frame
.
cleartoeol
();
info_frame
.
putmsg
(
'
\
x01n
\
x01w
'
+
xtrn
.
Desc
);
crlf
();
info_frame
.
putmsg
(
'
\
x01n
\
x01w
'
+
xtrn
.
Desc
+
'
\r\n
'
);
}
crlf
();
info_frame
.
crlf
();
if
(
xtrn
.
By
)
{
info_frame
.
putmsg
(
'
\
x01h
\
x01cBy
\
x01w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
x01w
'
+
xtrn
.
By
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
x01h
\
x01cBy
\
x01w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
x01w
'
+
xtrn
.
By
+
'
\r\n\r\n
'
);
}
if
(
xtrn
.
Cats
)
{
info_frame
.
putmsg
(
'
\
x01h
\
x01cCategories
\
x01w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
x01n
'
+
xtrn
.
Cats
);
crlf
();
crlf
();
info_frame
.
putmsg
(
'
\
x01h
\
x01cCategories
\
x01w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
x01n
'
+
xtrn
.
Cats
+
'
\r\n\r\n
'
);
}
if
(
xtrn
.
Subs
)
{
info_frame
.
putmsg
(
'
\
x01h
\
x01cSubcategories
\
x01w:
'
);
crlf
();
info_frame
.
putmsg
(
'
\
x01n
'
+
xtrn
.
Subs
);
crlf
();
}
var
y
=
info_frame
.
cursor
.
y
;
while
(
high_water
>
y
)
{
crlf
();
high_water
--
;
info_frame
.
putmsg
(
'
\
x01h
\
x01cSubcategories
\
x01w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
x01n
'
+
xtrn
.
Subs
+
'
\r\n
'
);
}
high_water
=
y
;
}
if
(
frame
.
cycle
())
console
.
gotoxy
(
console
.
screen_columns
,
console
.
screen_rows
);
}
...
...
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