Annotation of loncom/html/res/adm/pages/bookmarkmenu/bookmarkpal.html, revision 1.2

1.1       tyszkabe    1: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
                      2: <html>
                      3:   <head>
1.2     ! tyszkabe    4: <title>
        !             5: My Framed Annotations
        !             6: </title>
        !             7: 
        !             8: <script LANGUAGE="JavaScript">
        !             9: 
        !            10:     // This stuff is supplied by the perl mod. It contains all of the user defined bookmarks
        !            11:     // The builds the object of the users bookmarks.
        !            12:     function buildUserTree() {
        !            13: 
        !            14:     this.bookmarks = new addFolder("Stuff", 6, "none");
        !            15:     this.bookmarks.p[1] = new addLink("MSU Engine3ering", "http://www.egr.msu.edu", "bookmarks.p[1]");
        !            16:     this.bookmarks.p[2] = new addLink("MSU Engine2ering", "http://www.egr.msu.edu/~tyszkabe", "bookmarks.p[2]");
        !            17:     this.bookmarks.p[3] = new addFolder("more crap", 5, "bookmarks.p[3]");
        !            18:        this.bookmarks.p[3].p[1] = new addLink("more of a test actually", "http://www.transam.com", "bookmarks.p[3].p[1]");
        !            19:        this.bookmarks.p[3].p[2] = new addLink("ALL CAPS PLEASE!", "http://www.bullwinkle.com", "bookmarks.p[3].p[2]");
        !            20:        this.bookmarks.p[3].p[3] = new addFolder("double nested", 2, "bookmarks.p[3].p[3]");
        !            21:           this.bookmarks.p[3].p[3].p[1] = new addLink("Test 12alphbravotango", "http://www.jealousy.com", "bookmarks.p[3].p[3].p[1]");
        !            22:           this.bookmarks.p[3].p[3].p[2] = new addFolder("empty folder", 1, "bookmarks.p[3].p[3].p[2]");
        !            23: 	     this.bookmarks.p[3].p[3].p[2].p[1] = new addLink("buried deeply", "http://www.cooldudze.com", "bookmarks.p[3].p[3].p[2].p[1]");
        !            24:        this.bookmarks.p[3].p[4] = new addLink("simon and Garfunkle", "www.inneptitude.com", "bookmarks.p[3].p[4]");
        !            25:        this.bookmarks.p[3].p[5] = new addLink("garbage in garbage out", "www.holy.com", "bookmarks.p[3].p[5]");
        !            26:     this.bookmarks.p[4] = new addLink("MSU Engin4eering", "st4uffcom", "bookmarks.p[4]");
        !            27:     this.bookmarks.p[5] = new addFolder("more x2", 3, "bookmarks.p[5]");
        !            28:        this.bookmarks.p[5].p[1] = new addLink("Whack a holy mole", "www.whackamole.com", "bookmarks.p[5].p[1]");
        !            29:        this.bookmarks.p[5].p[2] = new addLink("molly moldy mole", "http://www.molemolemole.com", "bookmarks.p[5].p[2]");
        !            30:        this.bookmarks.p[5].p[3] = new addLink("Thou art even more holy", "www.holymoly.com", "bookmarks.p[5].p[3]");
        !            31:     this.bookmarks.p[6] = new addLink("Google", "http://www.google.com/", "bookmarks.p[6]");
        !            32:     }
        !            33: 
        !            34: 
        !            35:     // Adds a link to an object.
        !            36:     function addLink(name, link, address) {
        !            37:        this.name = name;
        !            38:        this.link = link;
        !            39:        this.address = address;
        !            40:        this.state = "link";
        !            41:    }
        !            42: 
        !            43: 
        !            44:     // Adds a folder to an object.
        !            45:     function addFolder(name, size, address) {
        !            46:        this.p = new Array(size);
        !            47:        this.name = name;
        !            48:        this.address = address;
        !            49:        this.state = "opened";
        !            50:     }
        !            51: 
        !            52: 
        !            53:     // Swaps folder state from open to closed.
        !            54:     // There's probably a better way to do this.
        !            55:     function clickOnFolder(folder) {
        !            56:        if (folder.state == "closed") {
        !            57:            folder.state = "opened";
        !            58:        } else {
        !            59:            folder.state = "closed";
        !            60:        }
        !            61:        redrawTree(1, bookmarkpal.bookmarks.p);
        !            62:     }
        !            63: 
        !            64: 
        !            65: 
        !            66:     // Recursive function to generate the Tree HTML code
        !            67:     function drawTree(depth, folder) {
        !            68:        for ( var i = 1; i < folder.length; i++) {
        !            69:           if ( i == folder.length - 1) {
        !            70:               var shape = "L";
        !            71:           } else {
        !            72:               var shape = "T";
        !            73:           }
        !            74:           if ( folder[i].state == "link") {
        !            75:              drawLink(depth, folder[i], shape);
        !            76:           } else {
        !            77:              drawFolder(depth, folder[i], shape);
        !            78:              if ( folder[i].state == "opened" && folder[i].p.length >= 0 ) {
        !            79:                 drawTree( depth+1, folder[i].p);
        !            80:              }
        !            81:           }
        !            82:        }
        !            83:     }
        !            84: 
        !            85: 
        !            86: 
        !            87:     // Writes HTML code for individual folder.
        !            88:     function drawFolder(depth, folder, shape) {
        !            89:        parent.frames[4].document.write("<TABLE border=0 cellspacing=0 cellpadding=0><TR><TD valign = middle nowrap>");
        !            90:        while ( depth > 1 ) {
        !            91: 	  parent.frames[4].document.write("<IMG src='line_vertical.gif' width=15 height=25>");
        !            92: 	  depth--;
        !            93:        }
        !            94:        if (shape == "L") {
        !            95: 	  parent.frames[4].document.write("<IMG src='line_l_shape.gif' width=15 height=25>");
        !            96:        } else {
        !            97: 	  parent.frames[4].document.write("<IMG src='line_side_T.gif' width=15 height=25>");
        !            98:        }
        !            99:        parent.frames[4].document.write("<A href=\"javascript:top.clickOnFolder(top.bookmarkpal."+folder.address+")\"><IMG src='folder_"+folder.state+".gif' width=25 height=25 border=noborder></A>");
        !           100:        parent.frames[4].document.write("<TD valign=middle align=left nowrap><FONT size=-1 face='Arial, Helvetica'>"+folder.name+"</FONT></TABLE>");
        !           101:     }
        !           102: 
        !           103: 
        !           104:     // Writes HTML code for individual link
        !           105:     function drawLink(depth, folder, shape) {       
        !           106:        parent.frames[4].document.write("<TABLE border=0 cellspacing=0 cellpadding=0><TR><TD valign = middle nowrap>");
        !           107:        while ( depth > 1 ) {
        !           108: 	  parent.frames[4].document.write("<IMG src='line_vertical.gif' width=15 height=25>");
        !           109: 	  depth--;
        !           110:        }
        !           111:        if (shape == "L") {
        !           112: 	  parent.frames[4].document.write("<IMG src='line_l_shape.gif' width=15 height=25>");
        !           113:        } else {
        !           114: 	  parent.frames[4].document.write("<IMG src='line_side_T.gif' width=15 height=25>");
        !           115:        }
        !           116:        parent.frames[4].document.write("<A href=\"javascript:top.clickOnBookmark\( '"+folder.link+"\' );\"><IMG src='link.gif' width=25 height=25 border=noborder></A>");
        !           117:        parent.frames[4].document.write("<TD valign=middle align=left nowrap><FONT size=-1 face='Arial, Helvetica'><A href=\"javascript:top.clickOnBookmark\( '"+folder.link+"\' );\">"+folder.name+"</a></FONT></TABLE>");
        !           118:     }
        !           119: 
        !           120: 
        !           121: //    function dragObject() {
        !           122: //    }
        !           123: 
        !           124:     // Opens a bookmark to the main window
        !           125:     function clickOnBookmark(url) {
        !           126:        opener.location.href=url;
        !           127:     }
        !           128: 
        !           129: //    function saveToLonCapa() {
        !           130: //    }
        !           131: 
        !           132: 
        !           133:     // Calls Build and draws functions. This function also takes
        !           134:     //   care of housekeeping
        !           135:     function initializeTree() {
        !           136: //            The following is Javascript 1.2 stuff. I'm not supposed to 
        !           137: //            use it and it doesn't seem to work anyways!
        !           138: //       top.captureEvents(events.RESIZE);
        !           139: //       top.onresize=redrawTree();
        !           140:        bookmarkpal = new buildUserTree();
        !           141:        parent.frames[4].document.write("<BODY>");
        !           142:        drawTree(1, bookmarkpal.bookmarks.p);
        !           143:        parent.frames[4].document.write("</BODY>");
        !           144:     }
        !           145: 
        !           146:     function redrawTree() {
        !           147:        parent.frames[4].document.clear();
        !           148:        parent.frames[4].document.write("<BODY>");
        !           149:        drawTree(1, bookmarkpal.bookmarks.p);
        !           150:        parent.frames[4].document.write("</BODY>");
        !           151:     }
        !           152: 
        !           153: 
        !           154: 
        !           155: //var current_mode="preview"
        !           156: //var available_mode="edit"
        !           157: //var dumb_swap='change_this';
        !           158: 
        !           159: //function swap_mode() {
        !           160: //    dumb_swap = available_mode;
        !           161: //    available_mode = current_mode;
        !           162: //    current_mode = dumb_swap;
        !           163: 
        !           164: //    update_button();
        !           165: //    update_content();
        !           166: 
        !           167: //}    
        !           168: 
        !           169: //function update_button() {
        !           170: //    this.document['previewedit'].src = "button_" + available_mode + ".gif";
        !           171: //}
        !           172: 
        !           173: //function update_content() {
        !           174: //    parent.frames[4].location.href = "annotator_content_" + current_mode + ".html"
        !           175: //}
        !           176: 
        !           177: </script>
        !           178: 
        !           179: 
        !           180: 
1.1       tyszkabe  181:   </head>
                    182: 
                    183: <FRAMESET rows="25, *, 30, 25" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 frameborder="0" border="0" framespacing="0" >
                    184: 
                    185:     <FRAMESET cols="25, *, 25" frameborder="0" borders="0" framespacing="0">
                    186: 	<FRAME src="annotator_ul.html" marginwidth="0" marginheight="0" scrolling="no">
                    187: 	<FRAME src="annotator_uu.html" marginwidth="0" marginheight="0" scrolling="no">
                    188: 	<FRAME src="annotator_ur.html" marginwidth="0" marginheight="0" scrolling="no">
                    189:     </FRAMESET>
                    190: 
                    191: 
                    192:     <FRAMESET name="contentb" cols="25, *, 25" frameborder="0" borders="0" framespacing="0">
                    193: 	<FRAME src="annotator_left.html" marginwidth="0" marginheight="0" scrolling="no">
                    194: 	<FRAME name="content" src="loading_bookmarks.html" marginwidth="0" marginheight="0" scrolling="auto">
                    195: 	<FRAME src="annotator_right.html" marginwidth="0" marginheight="0" scrolling="no">
                    196:     </FRAMESET>
                    197: 
                    198: 
                    199:     <FRAMESET cols="25, *, 25" frameborder="0" borders="0" framespacing="0">
                    200: 	<FRAME src="annotator_left.html" marginwidth="0" marginheight="0" scrolling="no">
                    201: 	<FRAME name="toolbar" src="annotator_toolbar.html" marginwidth="0" marginheight="0" scrolling="no">
                    202: 	<FRAME src="annotator_right.html" marginwidth="0" marginheight="0" scrolling="no">
                    203:     </FRAMESET>
                    204: 
                    205: 
                    206:     <FRAMESET cols="25, *, 25" frameborder="0" borders="0" framespacing="0">
                    207: 	<FRAME src="annotator_ll.html" marginwidth="0" marginheight="0" scrolling="no">
                    208: 	<FRAME src="annotator_bb.html" marginwidth="0" marginheight="0" scrolling="no">
                    209: 	<FRAME src="annotator_lr.html" marginwidth="0" marginheight="0" scrolling="no">
                    210:     </FRAMESET>
                    211: 
                    212: 
                    213: </FRAMESET>
                    214: 
                    215: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>