Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMJBM1

XMJBM1.m

Go to the documentation of this file.
  1. XMJBM1 ;ISC-SF/GMB-Manage Mail in Mailbox (cont.) ;07/19/2000 14:13
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. INIT(XMDUZ,XMRDR,XMABORT) ;
  1. D CHECK^XMVVITAE
  1. I XMDUZ'=DUZ,'$$RPRIV^XMXSEC D Q
  1. . S XMABORT=1
  1. . D SHOW^XMJERR
  1. D RDR(.XMRDR,.XMABORT)
  1. Q
  1. RDR(XMRDR,XMABORT) ;
  1. S XMRDR=XMV("RDR DEF")
  1. Q:XMV("RDR ASK")="N"
  1. N XMRDRTXT,XMOPT,XMOX,XMDIR
  1. D SET^XMXSEC1("C",34036,.XMOPT,.XMOX) ; C:Classic
  1. D SET^XMXSEC1("D",34037,.XMOPT,.XMOX) ; D:Detailed Full Screen
  1. D SET^XMXSEC1("S",34038,.XMOPT,.XMOX) ; S:Summary Full Screen
  1. I XMRDR="" S XMRDR="C"
  1. S XMRDRTXT=XMOPT(XMRDR)
  1. S XMDIR("A")=$$EZBLD^DIALOG(34047) ; Select message reader:
  1. S XMDIR("B")=XMOX("O",XMRDR)_":"_XMRDRTXT
  1. S XMDIR("??")="D QRDR^XMJBM1"
  1. D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMRDR,.XMABORT)
  1. Q
  1. QRDR ;
  1. N XMTEXT
  1. ;The Classic reader is the one that has been around forever.
  1. ;The Full Screen reader has two flavors:
  1. ;Detailed Full Screen contains a detailed message list.
  1. ;Summary Full Screen contains a summary message list.
  1. D BLD^DIALOG(34039,"","","XMTEXT","F")
  1. I $P($G(^XMB(3.7,DUZ,0)),U,16)="" D
  1. . ;You may choose a default MESSAGE READER under
  1. . ;'Personal Preferences|User Options Edit'.
  1. . ;Until you do, the Classic reader will be your default.
  1. . D BLD^DIALOG(34040,"","","XMTEXT","F")
  1. E D
  1. . ;Your default MESSAGE READER is the _XMRDRTXT_ reader.
  1. . ;You may change your default MESSAGE READER under
  1. . ;'Personal Preferences|User Options Edit'.
  1. . D BLD^DIALOG(34041,XMRDRTXT,"","XMTEXT","F")
  1. ;If you don't want to be asked this question again, and wish to use the
  1. ;XMRDRTXT_ reader exclusively, set the MESSAGE READER PROMPT to
  1. ;"No, don't ask" under 'Personal Preferences|User Options Edit'.
  1. D BLD^DIALOG(34042,XMRDRTXT,"","XMTEXT","F")
  1. D MSG^DIALOG("WH","","","","XMTEXT")
  1. Q
  1. ASKBSKT(XMDUZ,XMRDR,XMK,XMKN,XMABORT) ;
  1. N XMKNUM
  1. F D ASKBSKT^XMJBN(XMDUZ,0,.XMK,.XMKN,.XMABORT) Q:XMABORT D Q:XMKNUM
  1. . S XMKNUM=+$P($G(^XMB(3.7,XMDUZ,2,XMK,1,0)),U,4)
  1. . D:'XMKNUM NOMSGS(XMDUZ,XMK,XMKN)
  1. Q:XMABORT
  1. Q:'XMKNUM
  1. Q:XMRDR'="C"
  1. N XMPARM,XMTEXT
  1. S XMPARM(1)=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1)
  1. S XMPARM(2)=XMKNUM
  1. S XMPARM(3)=$P(^XMB(3.7,XMDUZ,2,XMK,0),U,2)
  1. ;Last message number: |1| Messages in basket: |2| (|3| new)
  1. ;Enter ??? for help.
  1. D BLD^DIALOG($S(XMPARM(3):34043.1,1:34043),.XMPARM,"","XMTEXT","F")
  1. D MSG^DIALOG("WM","","","","XMTEXT")
  1. Q
  1. NOMSGS(XMDUZ,XMK,XMKN) ;
  1. W !,$$EZBLD^DIALOG(34044,XMKN) ; No messages in '|1|' basket.
  1. Q:XMK<2
  1. I XMDUZ'=DUZ,$G(XMV("PRIV"))'["R",$G(XMV("PRIV"))'["W" Q
  1. W !
  1. N DIR,DIRUT,X,Y
  1. S DIR(0)="Y"
  1. ;Since the '_XMKN_' basket is empty,
  1. ;do you want to delete it
  1. D BLD^DIALOG(34045,XMKN,"","DIR(""A"")")
  1. S DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
  1. D ^DIR Q:'Y
  1. D DELBSKT^XMXBSKT(XMDUZ,XMK)
  1. W !,$$EZBLD^DIALOG(34046) ; Basket deleted.
  1. Q