Changes

Jump to: navigation, search

BookmarkPage

1,009 bytes added, 12:32, 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>
- After you click OK,
1
edit

Navigation menu