--- loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js 2000/10/24 14:02:35 1.9 +++ loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js 2000/11/01 21:04:36 1.10 @@ -210,7 +210,7 @@ function hoverTrash() { //----------------------------------------------------------------Add new link function newLink() { - var clienthref=opener.clientwindow.location.href; + var clienthref=opener.clientwindow.location.pathname; var clienttitle=opener.opener.document.title; add_link=window.open('','Link','width=360,height=165,scrollbars=0'); savedoc=add_link.document; @@ -221,7 +221,7 @@ function newLink() { instr+='Name:

'; instr+='Address:

'; instr+='
'; - instr+=''; + instr+=''; instr+=''; instr+='
'; instr+=''; @@ -229,8 +229,16 @@ function newLink() { savedoc.close(); } -//-------------------------------------------------------Add the just-named link +//--------------------------------------Add the just-named link at end of bookmarks function addNewLink(title,address) { + nextPosition=bookmarkpal.bookmarks.p.length; + bookmarkpal.bookmarks.p[nextPosition]=new addLink(title,address,"bookmarks",nextPosition); + add_link.close(); + redrawTree(); +} + +//-----------------------Add the just-named link and then position within bookmarks +function addNewLink_b(title,address) { dragCache="/res/adm/pages/bookmarkmenu/folder_opened.gif"; lastIcon="/res/adm/pages/bookmarkmenu/folder_opened.gif"; lastDrug="-1"; @@ -248,7 +256,7 @@ function newFolder() { instr+=''; instr+='Folder Name:

'; instr+='
'; - instr+=''; + instr+=''; instr+=''; instr+='
'; instr+=''; @@ -256,8 +264,17 @@ function newFolder() { savedoc.close(); } -//----------------------------------------------------Add the just-named folder +//----------------------Add the just-named folder at the end of the bookmarks list function addNewFolder(title) { + nextPosition=bookmarkpal.bookmarks.p.length; + nextAddress="bookmarks.p["+nextPosition+"]"; + bookmarkpal.bookmarks.p[nextPosition]=new addFolder(title,1,nextAddress); + add_link.close(); + redrawTree(); +} + +//---------------------------------Add the just-named folder and then position it +function addNewFolder_b(title) { dragCache="/res/adm/pages/bookmarkmenu/folder_opened.gif"; lastIcon="/res/adm/pages/bookmarkmenu/folder_opened.gif"; lastDrug="-1"; @@ -327,12 +344,11 @@ function initializeTree() { //--------------------------------Redraws screen without initiallizing anything function redrawTree() { + parent.frames[4].document.clear(); //---although depreciated, mozilla still needs it parent.frames[4].document.open(); image_num=0; parent.frames[4].document.write(""); -// parent.frames[4].document.write("

So far so good

"); //--debug drawTree(1,bookmarkpal.bookmarks.p); //----giving error: bookmarkpal not defined -// parent.frames[4].document.write("

Still doing good, after DrawTree

"); parent.frames[4].document.write(""); } @@ -389,6 +405,3 @@ function saveFolder(depth_string, folder function saveLink(depth_string,link,newpos) { saveVar+="this."+depth_string+".p["+newpos+"]=new addLink(\""+link.lname+"\",\""+link.link+"\",\""+depth_string+"\","+newpos+");\n"; } - - -