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
5e959e28
Commit
5e959e28
authored
12 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
On second thought, prompt for confirmation re: deletion.
parent
37e97829
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/ecreader/ecReader.js
+30
-10
30 additions, 10 deletions
xtrn/ecreader/ecReader.js
with
30 additions
and
10 deletions
xtrn/ecreader/ecReader.js
+
30
−
10
View file @
5e959e28
...
...
@@ -43,10 +43,13 @@ var messageFrame = new Frame(1, 3, 80, 21, BG_BLACK|WHITE, frame);
var
headerFrame
=
new
Frame
(
1
,
3
,
80
,
4
,
fbg
|
WHITE
,
messageFrame
);
var
bodyFrame
=
new
Frame
(
1
,
7
,
80
,
17
,
BG_BLACK
|
WHITE
,
messageFrame
);
var
messageBar
=
new
Frame
(
1
,
24
,
80
,
1
,
fbg
|
WHITE
,
messageFrame
);
var
promptFrame
=
new
Frame
(
20
,
8
,
40
,
6
,
fbg
|
WHITE
,
frame
);
var
promptSubFrame
=
new
Frame
(
22
,
9
,
36
,
4
,
BG_BLACK
|
WHITE
,
promptFrame
);
frame
.
open
();
messageFrame
.
bottom
();
headerFrame
.
bottom
();
promptFrame
.
bottom
();
columnFrame
.
putmsg
(
format
(
"
%-9s
"
,
"
Msg #
"
)
...
...
@@ -294,9 +297,12 @@ function showMessage(header) {
bodyFrame
.
scroll
(
0
,
bodyFrame
.
height
);
break
;
case
KEY_DEL
:
deleteMessage
(
header
);
userInput
=
"
Q
"
;
retval
=
"
REFRESH
"
;
if
(
deleteMessage
(
header
))
{
userInput
=
"
Q
"
;
retval
=
"
REFRESH
"
;
}
else
{
frame
.
cycle
();
}
break
;
default
:
break
;
...
...
@@ -313,21 +319,24 @@ function showMessage(header) {
}
function
deleteMessage
(
header
)
{
var
ret
=
false
;
if
(
!
mail
&&
user
.
number
==
1
)
{
msgBase
.
open
();
msgBase
.
remove_msg
(
header
.
number
);
msgBase
.
close
();
}
else
if
(
mail
)
{
if
(
prompt
(
"
Delete message #
"
+
header
.
number
))
{
msgBase
.
open
();
msgBase
.
remove_msg
(
header
.
number
);
msgBase
.
close
();
ret
=
true
;
}
}
else
if
(
mail
&&
prompt
(
"
Delete this message
"
))
{
/* Could verify again that mail is addressed to this user, but
they shouldn't have been able to select it otherwise. */
var
mailBase
=
new
MsgBase
(
"
mail
"
);
mailBase
.
open
();
mailBase
.
remove_msg
(
header
.
number
);
mailBase
.
close
();
}
else
{
return
false
;
ret
=
true
;
}
return
true
;
return
ret
;
}
function
sendEmail
()
{
...
...
@@ -349,6 +358,17 @@ function sendEmail() {
}
}
function
prompt
(
str
)
{
promptFrame
.
top
();
promptSubFrame
.
clear
();
frame
.
cycle
();
console
.
gotoxy
(
promptSubFrame
.
x
,
promptSubFrame
.
y
+
1
);
var
ret
=
console
.
yesno
(
str
);
promptFrame
.
bottom
();
frame
.
invalidate
();
return
ret
;
}
getList
();
var
userInput
=
""
;
var
r
=
""
;
...
...
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