%browserDTD; ]> this.boxObject.QueryInterface(Ci.nsIScrollBoxObject); [] -1 -1 this._matchCount - 1) return val; if (this._selectedItem) this._styleItem(this._selectedItem, false); // highlight the selected item let item = this._items.childNodes.item(val); if (item) { this._selectedItem = item; this._styleItem(this._selectedItem, true); this._scrollBoxObject.ensureElementIsVisible(this._selectedItem); } return this._selectedIndex = val; ]]> false ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") matchCount - 1) { // Just clear out the old item's value. CSS takes care of hiding // everything else based on value="" (star, tags, etc.) item.setAttribute("value", ""); item._empty = true; continue; } // Assign the values let type = controller.getStyleAt(i); let title = controller.getCommentAt(i); let tags = ''; if (type == "tag") { try { [, title, tags] = title.match(/^(.+) \u2013 (.+)$/); } catch (e) {} } item.setAttribute("tags", tags); let url = controller.getValueAt(i); item.setAttribute("value", title || url); // remove the badge only if the url has changed if (item._empty || item.getAttribute("url") != url) { item.setAttribute("url", url); item.setAttribute("subtitle", url); item.removeAttribute("badge"); item.removeAttribute("remote"); item.removeAttribute("search"); } let isBookmark = ((type == "bookmark") || (type == "tag")); item.setAttribute("favorite", isBookmark); item.setAttribute("src", controller.getImageAt(i)); if (type=="search") { item.setAttribute("search", true); item.setAttribute("subtitle", searchSubtitle); } item._empty = false; } // Show the "no results" or "all bookmarks" entries as needed this._updateNoResultsItem(matchCount); // Make sure the list is scrolled to the top this.scrollToTop(); this._invalidateBadges(); ]]> &noResults.label; lastIndex) newIndex = 0; else if (newIndex < 0) newIndex = lastIndex; this.selectedIndex = newIndex; ]]> document.getAnonymousElementByAttribute(this, "anonid", "autocomplete-items"); null null false document.getAnonymousElementByAttribute(this, "anonid", "name"); document.getAnonymousElementByAttribute(this, "anonid", "uri"); document.getAnonymousElementByAttribute(this, "anonid", "tags"); 0 || currentTags.length > 0) { let tagsToRemove = []; let tagsToAdd = []; for (let i = 0; i < currentTags.length; i++) { if (tags.indexOf(currentTags[i]) == -1) tagsToRemove.push(currentTags[i]); } for (let i = 0; i < tags.length; i++) { if (currentTags.indexOf(tags[i]) == -1) tagsToAdd.push(tags[i]); } if (tagsToAdd.length > 0) PlacesUtils.tagging.tagURI(this.uri, tagsToAdd); if (tagsToRemove.length > 0) PlacesUtils.tagging.untagURI(this.uri, tagsToRemove); } this.setAttribute('tags', this.tags); // If the URI was updated change it in the bookmark, but don't // allow a blank URI. Revert to previous URI if blank. let spec = this.spec; if (spec && this.uri.spec != spec) { try { let oldURI = this._uri; this._uri = Services.io.newURI(spec, null, null); PlacesUtils.bookmarks.changeBookmarkURI(this.itemId, this.uri); this.setAttribute('uri', this.spec); // move tags from old URI to new URI let tags = this.tagsAsArray; if (tags.length != 0) { // only untag the old URI if this is the only bookmark if (PlacesUtils.getBookmarksForURI(oldURI, {}).length == 0) PlacesUtils.tagging.untagURI(oldURI, tags); PlacesUtils.tagging.tagURI(this._uri, tags); } } catch (e) { } } if (spec != this.uri.spec) this.spec = this.uri.spec; } // Update the name and use the URI if name is blank this.name = this.name || this.spec; this.setAttribute('title', this.name); PlacesUtils.bookmarks.setItemTitle(this.itemId, this.name); ]]> -1000 false document.getAnonymousElementByAttribute(this, "anonid", "parent-items"); document.getAnonymousElementByAttribute(this, "anonid", "child-items"); this._children.scrollBoxObject null document.getAnonymousElementByAttribute(this, "anonid", "child-items"); this._children.scrollBoxObject 0 && msDelta < msPerDay && lastTitle != titleYesterday) { lastTitle = titleYesterday; items.push({ title: lastTitle }); } else if (msDelta > msPerDay && msDelta < msPerWeek && lastTitle != titleLastWeek) { lastTitle = titleLastWeek; items.push({ title: lastTitle }); } else if (msDelta > msPerWeek && lastTitle != titleOlder) { lastTitle = titleOlder; items.push({ title: lastTitle }); } items.push(node); } rootNode.containerOpen = false; return items; ]]> document.getAnonymousElementByAttribute(this, "anonid", "child-items"); this._children.scrollBoxObject = 30) { // Force a sync only for the tabs engine engine.lastModified = null; engine.sync(); Weave.Svc.Prefs.set("lastTabFetch", now); }; // Generate the list of tabs let tabs = []; for (let [guid, client] in Iterator(engine.getAllClients())) { tabs.push({ name: client.clientName }); client.tabs.forEach(function({title, urlHistory, icon}) { let pageURL = urlHistory[0]; tabs.push({ title: title || pageURL, uri: pageURL, icon: Weave.Utils.getIcon(icon, "chrome://browser/skin/images/tab.png") }); }); }; return tabs; ]]> 0.8) this._insertItems(); ]]> this.scrollBoxObject.height; [] document.getAnonymousElementByAttribute(this, "anonid", "previous-button"); document.getAnonymousElementByAttribute(this, "anonid", "next-button"); document.getElementById(this.getAttribute("spacer")); null 0 || selectionEnd < aTextbox.textLength) json.types.push("select-all"); let clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard); let flavors = ["text/unicode"]; let hasData = clipboard.hasDataMatchingFlavors(flavors, flavors.length, Ci.nsIClipboard.kGlobalClipboard); if (hasData && (!aTextbox.readOnly || aIgnoreReadOnly)) json.types.push("paste"); ContextHelper.showPopup({ target: aTextbox, json: json }); ]]>