|
From: creecode <icr...@us...> - 2006-03-07 05:39:14
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6797 Modified Files: openSite Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: openSite =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/openSite,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openSite 26 Mar 2005 19:42:24 -0000 1.1.1.1 --- openSite 7 Mar 2006 05:39:11 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.windowTypes.openSite ! on openSite (adrinfo, username, password, flHidden=false, adradrwindow=nil) { ÇOpen a site in a window. Assume the prefs have already been set up. ÇWe get from the Manila site a structure that contains: editorialRole, siteOutline, flCheckedOut. Ç10/11/00; 10:58:19 PM by PBS ÇChanges: Ç10/28/00; 1:14:00 PM by PBS ÇMake sure there's a Manila Editors node. Ç11/03/00; 1:11:46 AM by JES ÇAdd flAcceptsOpml to the site-prefs table if the server specifies it. Ç11/20/00; 1:40:27 AM by JES ÇDon't base64 decode the site outline when getting the opml through the Manila glue, since the glue script does this for us. Ç12/04/00; 4:57:06 PM by JES ÇIf the entered or cached username doesn not specify a member of the site, present a username/password dialog. Ç12/08/00; 11:51:29 AM by JES ÇIf username doesn't correspond to a member of the site, display an error message before presenting the email/password dialog again. Ç12/31/00; 5:07:27 PM by JES ÇOn Macs, call op.xmlToOutline on opml that's converted to Mac text. Ç02/16/01; 1:38:32 PM by JES ÇSet the window's lastSave to now, to prevent extraneous save-confirmation dialogs after getting the outline from the server. If the user is not a managing editor, set flReadOnly to true -- if the user can't save the outline, why should they be able to edit it? Ç04/30/01; 2:20:30 AM by JES ÇFixed a bug where the editorial outline was read-only for a managing editor, when it should be read/write. Ç09/06/01; 8:48:15 PM by JES ÇSet adradrwindow immediately after creating the window, since it's needed by manila.windowTypes.manilaSite.openManilaSite, even if opening the site fails. bundle { //if the window is already open, bring it to the front local (t); new (tableType, @t); local (adrtype = parentOf (this^)); t.type = "manilaSite"; t.adrSiteInfo = adrinfo; local (adrwindow); if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { local (title, flReadOnly = false); window.attributes.getOne ("title", @title, adrwindow); window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); if not flHidden { edit (adrwindow, title, flReadOnly); return (true)}}}; bundle { //get siteName if adrinfo^.siteName == "" { adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = adrinfo^.siteName}}; local (adrwindow); bundle { //create the window adrwindow = Frontier.tools.windowTypes.newWindow ("manilaSite", true); window.attributes.setOne ("adrSiteInfo", adrinfo, adrwindow); if adradrwindow != nil { adradrwindow^ = adrwindow}}; local (flReadOnly = false); local (flManagingEditor = false); local (flEditor = false); local (siteStruct); local (flGotFromServer = false); bundle { //make sure we have a username and password if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { return (false)}; bundle { //12/04/00 JES: make sure username specifies a member of the site local (memberRole = manila.member.getRole (adrinfo, username)); while memberRole == 4 { // loop until the user enters a username that's a member of the site dialog.alert ("Can't open " + nameOf (adrinfo^) + " because " + username + " is not a member."); //12/08/00 JES: Tell the user why the password dialog is about to appear again. manila.windowTypes.setUsernameAndPassword (adrinfo, username, ""); //clear the password if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { manila.windowTypes.setUsernameAndPassword (adrinfo, username, password); username = string (username); password = string (password); memberRole = manila.member.getRole (adrinfo, username)} else { //clean up data, delete the unfinished window's windowType table if defined (adrinfo^) { adrinfo^.username = ""; adrinfo^.password = ""; if defined (system.temp.manila.data.sites) { if defined (system.temp.manila.data.sites.[nameOf (adrinfo^)]) { delete (@system.temp.manila.data.sites.[nameOf (adrinfo^)])}}}; delete (parentOf (adrwindow^)); return (false)}}; case memberRole { 1 { flEditor = true; flManagingEditor = true}; 2 { flEditor = true}}}}; try { //get the outline in a try because it might not exist yet local (rpcCallInfo = adrinfo^); rpcCallInfo.password = password; rpcCallInfo.username = username; siteStruct = manila.editorialOutline.get (@rpcCallInfo); if siteStruct.editorialRole == "Managing Editor" { flManagingEditor = true; flEditor = true}; if siteStruct.editorialRole == "Contributing Editor" { flEditor = true; flReadOnly = true}; if siteStruct.flCheckedOut { flReadOnly = true}; if defined (siteStruct.displaySiteName) { adrinfo^.displaySiteName = siteStruct.displaySiteName}; if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml { //11/02/00 JES adrinfo^.flAcceptsOpml = true} else { adrinfo^.flAcceptsOpml = false}; flGotFromServer = true}; if flGotFromServer and flEditor { local (opmlText = siteStruct.siteOutline); //11/20/00 JES: support for calling RPC handlers through the Manila glue. if system.environment.isMac { //12/31/00 JES: convert to Mac text op.xmlToOutline (latinToMac.convert (opmlText), adrwindow)} else { op.xmlToOutline (opmlText, adrwindow)}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = window.getTitle (adrwindow)}} else { //do default nodes local (oldTarget = target.set (adrwindow)); manila.windowTypes.buildManilaSiteOutline (adrwindow, adrinfo); op.firstSummit (); op.promote (); op.deleteLine (); op.firstSummit (); try {target.set (oldTarget)}; flReadOnly = false}; bundle { //make sure there's an Editors node local (oldTarget = target.set (adrwindow)); local (origCursor = op.getCursor ()); local (flFound = false); op.firstSummit (); loop { local (atts); if op.attributes.getAll (@atts) { if defined (atts.type) { if atts.type == "manilaEditorsContainer" { if atts.containerType == "toplevel" { flFound = true; break}}}}; if not (op.go (down, 1)) { break}}; if not flFound { //set up an Editors node op.insert ("Editors", down); local (atts); new (tableType, @atts); atts.type = "manilaEditorsContainer"; atts.containerType = "toplevel"; atts.siteUrl = nameOf (adrinfo^); op.attributes.addGroup (@atts)}; op.setCursor (origCursor); try {target.set (oldTarget)}}; local (t); new (tableType, @t); bundle { //set attributes if not flGotFromServer { setTimeModified (adrwindow, date (0))}; if not flManagingEditor { flReadOnly = true}; if adrinfo^.displaySiteName == "" { t.title = adrinfo^.siteName} else { t.title = adrinfo^.displaySiteName}; t.flReadOnly = flReadOnly; t.lastSaved = timeModified (adrwindow); //this happens in Frontier.tools.windowTypes.newWindow window.attributes.addGroup (@t, adrwindow)}; if not flHidden { edit (adrwindow, t.title, flReadOnly)}; return (true); Çbundle //old code Çif not defined (temp.pike) Çnew (tableType, @temp.pike) Çif not defined (temp.pike.outlines) Çnew (tableType, @temp.pike.outlines) Çlocal (adrOutlinesTable = @temp.pike.outlines) Çlocal (adrTable = @adrOutlinesTable^.[displaySiteName]) Çif not defined (adrTable) Çnew (tableType, adrTable) Ç Çlocal (flOpenAlready = false) Çif defined (adrTable^.outline) and window.isOpen (@adrTable^.outline) ÇflOpenAlready = true Çif flOpenAlready Çwindow.bringToFront (@adrTable^.outline) Çelse //create outline Çnew (tableType, adrTable) Çnew (outlineType, @adrTable^.outline) Çlocal (flReadOnly = false) Çlocal (flManagingEditor = false) Çlocal (flEditor = false) Çlocal (siteStruct) Çlocal (flGotFromServer = false) Çlocal (flAcceptsOpml = false) //11/02/00 JES Çbundle //12/04/00 JES: make sure username specifies a member of the site Çlocal (siteInfo = playlist.manila.buildSiteInfo (siteUrl)) Çif siteInfo.username == "" and siteInfo.password == ""// the user cancelled the username/password dialog Çreturn (false) Çlocal (memberRole = manila.member.getRole (@siteInfo, username)) Çwhile memberRole == 4 // loop until the user enters a username that's a member of the site Çdialog.alert ("Can't open " + siteUrl + " because " + username + " is not a member.") //12/08/00 JES: Tell the user why the password dialog is about to appear again. Çif playlist.manila.getPasswordDialog (siteUrl, @username, @password) Çplaylist.manila.setUsernameAndPassword (siteUrl, username, password) Çusername = string (username) Çpassword = string (password) ÇmemberRole = manila.member.getRole (@siteInfo, username) Çelse Çreturn (false) Çcase memberRole Ç1 ÇflEditor = true ÇflManagingEditor = true Ç2 ÇflEditor = true Çtry ÇsiteStruct = playlist.manila.rpc.getManilaSiteOutline (siteUrl, username, password) Çif siteStruct.flCheckedOut ÇflReadOnly = true Çif siteStruct.editorialRole == "Managing Editor" ÇflManagingEditor = true ÇflEditor = true Çif siteStruct.editorialRole == "Contributing Editor" ÇflEditor = true ÇflReadOnly = true Çif siteStruct.flCheckedOut ÇflReadOnly = true Çif defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml //11/02/00 JES ÇflAcceptsOpml = true Çuser.playlist.manila.sites.[siteUrl].flAcceptsOpml = true ÇflGotFromServer = true Çif flGotFromServer and flEditor Çlocal (opmlText = base64.decode (siteStruct.siteOutline)) Çlocal (opmlText = siteStruct.siteOutline) //11/20/00 JES: support for calling RPC handlers through the Manila glue. Çif system.environment.isMac //12/31/00 JES: convert to Mac text Çop.xmlToOutline (latinToMac.convert (opmlText), @adrTable^.outline) Çelse Çop.xmlToOutline (opmlText, @adrTable^.outline) Çelse //do default nodes Çlocal (oldTarget = target.set (@adrTable^.outline)) Çplaylist.manila.commands.addManilaSiteNode (siteUrl, username:username, password:password) Çop.firstSummit () Çop.promote () Çop.deleteLine () Çop.firstSummit () Çtry {target.set (oldTarget)} ÇflReadOnly = false Ç Çif flGotFromServer //02/16/00 JES: set lastSave so that non-dirty outlines don't act dirty ÇadrTable^.flSaved = true ÇadrTable^.lastSave = clock.now () Çelse ÇadrTable^.flSaved = false Çif not flManagingEditor //02/16/00 JES: if the user is not a managing editor, prevent a save/don't save/cancel dialog when closing the outline ÇflReadOnly = true ÇadrTable^.timeCreated = clock.now () ÇadrTable^.title = displaySiteName ÇadrTable^.flLocal = false ÇadrTable^.flManilaSiteOutline = true ÇadrTable^.flReadOnly = flReadOnly ÇadrTable^.siteUrl = siteUrl ÇadrTable^.flAcceptsOpml = flAcceptsOpml //11/02/00 JES Ç Çbundle //make sure there's an Editors node Çlocal (adrOutline = @adrTable^.outline) Çlocal (oldTarget = target.set (adrOutline)) Çlocal (origCursor = op.getCursor ()) Çlocal (flFound = false) Çop.firstSummit () Çloop Çlocal (atts) Çif op.attributes.getAll (@atts) Çif defined (atts.type) Çif atts.type == "manilaEditorsContainer" Çif atts.containerType == "toplevel" ÇflFound = true Çbreak Çif not (op.go (down, 1)) Çbreak Çif not flFound //set up an Editors node Çop.insert ("Editors", down) Çlocal (atts) Çnew (tableType, @atts) Çatts.type = "manilaEditorsContainer" Çatts.containerType = "toplevel" Çatts.siteUrl = siteUrl Çop.attributes.addGroup (@atts) Çop.setCursor (origCursor) Çtry {target.set (oldTarget)} Çedit (@adrTable^.outline, displaySiteName, flReadOnly) Ç Çreturn (true)}; Çbundle //testing ÇopenSite (@user.manila.data.sites.["http://private.braincase.net:80/"], "ja...@us...", "forget!it") \ No newline at end of file --- 1,299 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.windowTypes.openSite ! on openSite (adrinfo, username, password, flHidden=false, adradrwindow=nil) { ! «Changes ! «2/28/06; 12:05:13 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2001 ! «09/06/01; 8:48:15 PM by JES ! «Set adradrwindow immediately after creating the window, since it's needed by manila.windowTypes.manilaSite.openManilaSite, even if opening the site fails. ! «04/30/01; 2:20:30 AM by JES ! «Fixed a bug where the editorial outline was read-only for a managing editor, when it should be read/write. ! «02/16/01; 1:38:32 PM by JES ! «Set the window's lastSave to now, to prevent extraneous save-confirmation dialogs after getting the outline from the server. If the user is not a managing editor, set flReadOnly to true -- if the user can't save the outline, why should they be able to edit it? ! «2000 ! «12/31/00; 5:07:27 PM by JES ! «On Macs, call op.xmlToOutline on opml that's converted to Mac text. ! «12/08/00; 11:51:29 AM by JES ! «If username doesn't correspond to a member of the site, display an error message before presenting the email/password dialog again. ! «12/04/00; 4:57:06 PM by JES ! «If the entered or cached username doesn not specify a member of the site, present a username/password dialog. ! «11/20/00; 1:40:27 AM by JES ! «Don't base64 decode the site outline when getting the opml through the Manila glue, since the glue script does this for us. ! «11/03/00; 1:11:46 AM by JES ! «Add flAcceptsOpml to the site-prefs table if the server specifies it. ! «10/28/00; 1:14:00 PM by PBS ! «Make sure there's a Manila Editors node. ! «Open a site in a window. Assume the prefs have already been set up. ! «We get from the Manila site a structure that contains: editorialRole, siteOutline, flCheckedOut. ! «10/11/00; 10:58:19 PM by PBS ! ! bundle { //if the window is already open, bring it to the front ! local (t); new (tableType, @t); ! local (adrtype = parentOf (this^)); ! t.type = "manilaSite"; ! t.adrSiteInfo = adrinfo; ! local (adrwindow); ! if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { ! local (title, flReadOnly = false); ! window.attributes.getOne ("title", @title, adrwindow); ! window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); ! if not flHidden { ! edit (adrwindow, title, flReadOnly); ! return (true)}}}; ! ! bundle { //get siteName ! if adrinfo^.siteName == "" { ! adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = adrinfo^.siteName}}; ! ! local (adrwindow); ! bundle { //create the window ! adrwindow = Frontier.tools.windowTypes.newWindow ("manilaSite", true); ! window.attributes.setOne ("adrSiteInfo", adrinfo, adrwindow); ! if adradrwindow != nil { ! adradrwindow^ = adrwindow}}; ! local (flReadOnly = false); ! local (flManagingEditor = false); ! local (flEditor = false); ! local (siteStruct); ! local (flGotFromServer = false); ! ! bundle { //make sure we have a username and password ! if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! return (false)}; ! bundle { //12/04/00 JES: make sure username specifies a member of the site ! local (memberRole = manila.member.getRole (adrinfo, username)); ! while memberRole == 4 { // loop until the user enters a username that's a member of the site ! dialog.alert ("Can't open " + nameOf (adrinfo^) + " because " + username + " is not a member."); //12/08/00 JES: Tell the user why the password dialog is about to appear again. ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, ""); //clear the password ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, password); ! username = string (username); ! password = string (password); ! memberRole = manila.member.getRole (adrinfo, username)} ! else { //clean up data, delete the unfinished window's windowType table ! if defined (adrinfo^) { ! adrinfo^.username = ""; ! adrinfo^.password = ""; ! if defined (system.temp.manila.data.sites) { ! if defined (system.temp.manila.data.sites.[nameOf (adrinfo^)]) { ! delete (@system.temp.manila.data.sites.[nameOf (adrinfo^)])}}}; ! delete (parentOf (adrwindow^)); ! return (false)}}; ! case memberRole { ! 1 { ! flEditor = true; ! flManagingEditor = true}; ! 2 { ! flEditor = true}}}}; ! ! try { //get the outline in a try because it might not exist yet ! local (rpcCallInfo = adrinfo^); ! rpcCallInfo.password = password; ! rpcCallInfo.username = username; ! siteStruct = manila.editorialOutline.get (@rpcCallInfo); ! if siteStruct.editorialRole == "Managing Editor" { ! flManagingEditor = true; ! flEditor = true}; ! if siteStruct.editorialRole == "Contributing Editor" { ! flEditor = true; ! flReadOnly = true}; ! if siteStruct.flCheckedOut { ! flReadOnly = true}; ! if defined (siteStruct.displaySiteName) { ! adrinfo^.displaySiteName = siteStruct.displaySiteName}; ! if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml { //11/02/00 JES ! adrinfo^.flAcceptsOpml = true} ! else { ! adrinfo^.flAcceptsOpml = false}; ! flGotFromServer = true}; ! ! if flGotFromServer and flEditor { ! local (opmlText = siteStruct.siteOutline); //11/20/00 JES: support for calling RPC handlers through the Manila glue. ! if system.environment.isMac { //12/31/00 JES: convert to Mac text ! op.xmlToOutline (string.latinToMac (opmlText), adrwindow)} ! else { ! op.xmlToOutline (opmlText, adrwindow)}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = window.getTitle (adrwindow)}} ! else { //do default nodes ! local (oldTarget = target.set (adrwindow)); ! manila.windowTypes.buildManilaSiteOutline (adrwindow, adrinfo); ! op.firstSummit (); ! op.promote (); ! op.deleteLine (); ! op.firstSummit (); ! try {target.set (oldTarget)}; ! flReadOnly = false}; ! ! bundle { //make sure there's an Editors node ! local (oldTarget = target.set (adrwindow)); ! local (origCursor = op.getCursor ()); ! local (flFound = false); ! op.firstSummit (); ! loop { ! local (atts); ! if op.attributes.getAll (@atts) { ! if defined (atts.type) { ! if atts.type == "manilaEditorsContainer" { ! if atts.containerType == "toplevel" { ! flFound = true; ! break}}}}; ! if not (op.go (down, 1)) { ! break}}; ! if not flFound { //set up an Editors node ! op.insert ("Editors", down); ! local (atts); ! new (tableType, @atts); ! atts.type = "manilaEditorsContainer"; ! atts.containerType = "toplevel"; ! atts.siteUrl = nameOf (adrinfo^); ! op.attributes.addGroup (@atts)}; ! op.setCursor (origCursor); ! try {target.set (oldTarget)}}; ! ! local (t); new (tableType, @t); ! bundle { //set attributes ! if not flGotFromServer { ! setTimeModified (adrwindow, date (0))}; ! if not flManagingEditor { ! flReadOnly = true}; ! if adrinfo^.displaySiteName == "" { ! t.title = adrinfo^.siteName} ! else { ! t.title = adrinfo^.displaySiteName}; ! t.flReadOnly = flReadOnly; ! t.lastSaved = timeModified (adrwindow); //this happens in Frontier.tools.windowTypes.newWindow ! window.attributes.addGroup (@t, adrwindow)}; ! ! if not flHidden { ! edit (adrwindow, t.title, flReadOnly)}; ! ! return (true); ! }; ! «bundle //old code ! «if not defined (temp.pike) ! «new (tableType, @temp.pike) ! «if not defined (temp.pike.outlines) ! «new (tableType, @temp.pike.outlines) ! «local (adrOutlinesTable = @temp.pike.outlines) ! «local (adrTable = @adrOutlinesTable^.[displaySiteName]) ! «if not defined (adrTable) ! «new (tableType, adrTable) ! « ! «local (flOpenAlready = false) ! «if defined (adrTable^.outline) and window.isOpen (@adrTable^.outline) ! «flOpenAlready = true ! «if flOpenAlready ! «window.bringToFront (@adrTable^.outline) ! «else //create outline ! «new (tableType, adrTable) ! «new (outlineType, @adrTable^.outline) ! «local (flReadOnly = false) ! «local (flManagingEditor = false) ! «local (flEditor = false) ! «local (siteStruct) ! «local (flGotFromServer = false) ! «local (flAcceptsOpml = false) //11/02/00 JES ! «bundle //12/04/00 JES: make sure username specifies a member of the site ! «local (siteInfo = playlist.manila.buildSiteInfo (siteUrl)) ! «if siteInfo.username == "" and siteInfo.password == ""// the user cancelled the username/password dialog ! «return (false) ! «local (memberRole = manila.member.getRole (@siteInfo, username)) ! «while memberRole == 4 // loop until the user enters a username that's a member of the site ! «dialog.alert ("Can't open " + siteUrl + " because " + username + " is not a member.") //12/08/00 JES: Tell the user why the password dialog is about to appear again. ! «if playlist.manila.getPasswordDialog (siteUrl, @username, @password) ! «playlist.manila.setUsernameAndPassword (siteUrl, username, password) ! «username = string (username) ! «password = string (password) ! «memberRole = manila.member.getRole (@siteInfo, username) ! «else ! «return (false) ! «case memberRole ! «1 ! «flEditor = true ! «flManagingEditor = true ! «2 ! «flEditor = true ! «try ! «siteStruct = playlist.manila.rpc.getManilaSiteOutline (siteUrl, username, password) ! «if siteStruct.flCheckedOut ! «flReadOnly = true ! «if siteStruct.editorialRole == "Managing Editor" ! «flManagingEditor = true ! «flEditor = true ! «if siteStruct.editorialRole == "Contributing Editor" ! «flEditor = true ! «flReadOnly = true ! «if siteStruct.flCheckedOut ! «flReadOnly = true ! «if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml //11/02/00 JES ! «flAcceptsOpml = true ! «user.playlist.manila.sites.[siteUrl].flAcceptsOpml = true ! «flGotFromServer = true ! «if flGotFromServer and flEditor ! «local (opmlText = base64.decode (siteStruct.siteOutline)) ! «local (opmlText = siteStruct.siteOutline) //11/20/00 JES: support for calling RPC handlers through the Manila glue. ! «if system.environment.isMac //12/31/00 JES: convert to Mac text ! «op.xmlToOutline (string.latinToMac (opmlText), @adrTable^.outline) ! «else ! «op.xmlToOutline (opmlText, @adrTable^.outline) ! «else //do default nodes ! «local (oldTarget = target.set (@adrTable^.outline)) ! «playlist.manila.commands.addManilaSiteNode (siteUrl, username:username, password:password) ! «op.firstSummit () ! «op.promote () ! «op.deleteLine () ! «op.firstSummit () ! «try {target.set (oldTarget)} ! «flReadOnly = false ! « ! «if flGotFromServer //02/16/00 JES: set lastSave so that non-dirty outlines don't act dirty ! «adrTable^.flSaved = true ! «adrTable^.lastSave = clock.now () ! «else ! «adrTable^.flSaved = false ! «if not flManagingEditor //02/16/00 JES: if the user is not a managing editor, prevent a save/don't save/cancel dialog when closing the outline ! «flReadOnly = true ! «adrTable^.timeCreated = clock.now () ! «adrTable^.title = displaySiteName ! «adrTable^.flLocal = false ! «adrTable^.flManilaSiteOutline = true ! «adrTable^.flReadOnly = flReadOnly ! «adrTable^.siteUrl = siteUrl ! «adrTable^.flAcceptsOpml = flAcceptsOpml //11/02/00 JES ! « ! «bundle //make sure there's an Editors node ! «local (adrOutline = @adrTable^.outline) ! «local (oldTarget = target.set (adrOutline)) ! «local (origCursor = op.getCursor ()) ! «local (flFound = false) ! «op.firstSummit () ! «loop ! «local (atts) ! «if op.attributes.getAll (@atts) ! «if defined (atts.type) ! «if atts.type == "manilaEditorsContainer" ! «if atts.containerType == "toplevel" ! «flFound = true ! «break ! «if not (op.go (down, 1)) ! «break ! «if not flFound //set up an Editors node ! «op.insert ("Editors", down) ! «local (atts) ! «new (tableType, @atts) ! «atts.type = "manilaEditorsContainer" ! «atts.containerType = "toplevel" ! «atts.siteUrl = siteUrl ! «op.attributes.addGroup (@atts) ! «op.setCursor (origCursor) ! «try {target.set (oldTarget)} ! «edit (@adrTable^.outline, displaySiteName, flReadOnly) ! « ! «return (true)}; ! ! «bundle // testing ! «openSite (@user.manila.data.sites.["http://private.braincase.net:80/"], "ja...@us...", "forget!it") \ No newline at end of file |