Changes

Jump to: navigation, search

BookmarkPage

1,938 bytes added, 12:01, 29 September 2006
no edit summary
==Bookmark > Bookmark This Page==
* [http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/extensions/cck/browser/resources/content/cckwizard/bookmark.xul /extensions/cck/browser/resources/content/cckwizard/bookmark.xul]
<code>
45 <dialog id="createbookmark" title="&bookmark.label;"
- Defines the the Add Bookmark dialog box.
* [http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/extensions/cck/browser/resources/content/cckwizard/cckwizard.js /extensions/cck/browser/resources/content/cckwizard/cckwizard.js]
<code>
538 function bookmarkCheckOKButton()
</code>
- Enable the OK button only if the bookmark name and URL is defined.
 
<code>
547 function OnBookmarkOK()
548 {
549
550 listbox = this.opener.document.getElementById(getPageId() +'.bookmarkList');
551 var listitem;
552 if (window.name == 'newbookmark') {
553 listitem = listbox.appendItem(document.getElementById('bookmarkname').value, document.getElementById('bookmarkurl').value);
554 listitem.setAttribute("class", "listitem-iconic");
555 } else {
556 listitem = listbox.selectedItem;
557 listitem.setAttribute("label", document.getElementById('bookmarkname').value);
558 listitem.setAttribute("value", document.getElementById('bookmarkurl').value);
559 }
560 if (document.getElementById('liveBookmark').checked) {
561 listitem.cck['type'] = "live";
562 listitem.setAttribute("image", "chrome://browser/skin/page-livemarks.png");
563 } else {
564 listitem.setAttribute("image", "chrome://browser/skin/Bookmarks-folder.png");
565 listitem.cck['type'] = "";
566 }
567 }
</code>
 
http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/browser/components/bookmarks/content/addBookmark.js
 
<code>
130 case "newBookmark":
131 setupFields();
132 if (window.arguments[2])
133 gCreateInFolder = window.arguments[2];
134 document.getElementById("folderbox").setAttribute("hidden", "true");
135 sizeToFit();
136 break;
137 default:
138 // Regular Add Bookmark
139 setupFields();
140 if (window.arguments[2]) {
141 gCreateInFolder = window.arguments[2];
142 folderItem = bookmarkView.rdf.GetResource(gCreateInFolder);
143 if (folderItem) {
144 ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);
145 bookmarkView.treeBoxObject.view.selection.select(ind);
146 }
147 }
</code>
 
http://landfill.mozilla.org/mxr-test/mozilla1.8.x/source/xpfe/components/bookmarks/src/nsBookmarksService.cpp
1
edit

Navigation menu